package com.group01.community.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.group01.community.entity.ZyUnit;
import com.group01.community.entity.vo.ZyUnitVo;
import com.group01.community.mapper.ZyUnitMapper;
import com.group01.community.service.ZyUnitService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 单元  服务实现类
 * </p>
 *
 * @author guoyuan
 * @since 2025-05-01
 */
@Service
public class ZyUnitServiceImpl extends ServiceImpl<ZyUnitMapper, ZyUnit> implements ZyUnitService {

    @Autowired
    private ZyUnitMapper zyUnitMapper;

    @Override
    public IPage<ZyUnitVo> getUnitPage(int curr, int size, Long communityId, Long buildingId, String unitName, String unitCode) {
        return zyUnitMapper.getUnitInterceptor(new Page<>(curr, size), communityId, buildingId, unitName, unitCode);
    }
}
